UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YEparoDr1l2U6TYhxaLaf0r8Xk1XXuPNM4iIPz470JY='
WHERE
key_id = 'f86fc5fb295d898a933c87bf238c44115a2a5cd42fd2581e8d375cd2ad4f816a'
AND (
token = 'YEparoDr1l2U6TYhxaLaf0r8Xk1XXuPNM4iIPz470JY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)