UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'K6aPQM/M07cK37wXNc7tA7hww8l2tcCvKNOjD9QO4T0='
WHERE
key_id = '41ba6ae36b8821c91fff0de09bbf23b795d782172a0480c003fd41f722d6b5e1'
AND (
token = 'K6aPQM/M07cK37wXNc7tA7hww8l2tcCvKNOjD9QO4T0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)