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