UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Spa0j8d+7G1/jkcwz1E+ZCXM08Zd9Rm5cYQdoxYRvWE='
WHERE
key_id = '60a58d65e3092f629ce6795e31aaa7d2cc40ced8f10931445e6d5d96c55d7e5f'
AND (
token = 'Spa0j8d+7G1/jkcwz1E+ZCXM08Zd9Rm5cYQdoxYRvWE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)