UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DbD/nv+XfKzXLnHQULylzOm5H8VKjxJR+pEcSG4ag7E='
WHERE
key_id = '5e0ed2ffeda9f759450077480be8b60d69b49166647496cf3dc87e3b372bf591'
AND (
token = 'DbD/nv+XfKzXLnHQULylzOm5H8VKjxJR+pEcSG4ag7E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)