UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EfEmEkjRltTibqkeke4dxqkCOpSvz2Aun3Z/PhZxOJo='
WHERE
key_id = '7b204e0a265abc2f7928899a725af2e80a94b513ee94dda5a9ac2870ffe343ee'
AND (
token = 'EfEmEkjRltTibqkeke4dxqkCOpSvz2Aun3Z/PhZxOJo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)