UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p73LWYIAfv1Jw3Ii1xncgxVePtqhHzS88Po4QdMNkcg='
WHERE
key_id = '4ac44c3460b2d4acdb0dc01f751c592a7888b7ebb9a31e0146ead00a7f568921'
AND (
token = 'p73LWYIAfv1Jw3Ii1xncgxVePtqhHzS88Po4QdMNkcg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)