UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xygCTiDvxdPjcqyBd78lqb6DkEBZzpVn20cWDp1ILy8='
WHERE
key_id = '705388bef147de284cbdd04a59e8ce3c25a017c63f454be3b63f34c20244e203'
AND (
token = 'xygCTiDvxdPjcqyBd78lqb6DkEBZzpVn20cWDp1ILy8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)