UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vPbT2Idcc6DPthdMRHGhgTEEqunB73fl4qkrrC0yojQ='
WHERE
key_id = '2529a7eb90fae190d904d757edd00d93fc9e16a38bf5b3e5c34681fd96192ee8'
AND (
token = 'vPbT2Idcc6DPthdMRHGhgTEEqunB73fl4qkrrC0yojQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)