UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+1IyYa6On0l+5sClLgWXgg1iR2f/t5Rl9wjEkbUvj3k='
WHERE
key_id = 'e7848614555722c6b752500e6133c04a2367737a914ac57d2faa0102434ff32d'
AND (
token = '+1IyYa6On0l+5sClLgWXgg1iR2f/t5Rl9wjEkbUvj3k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)