UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jaSq4TeDB8PAmntdIT+j7eojYa0djmqNJzOJi3Wiz4Q='
WHERE
key_id = '64333725c820cacbf764b7a2ee8c44343ac9d1d9fca236f96e46e92396bbe90c'
AND (
token = 'jaSq4TeDB8PAmntdIT+j7eojYa0djmqNJzOJi3Wiz4Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)