UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PvcvhIuxx/m9j/LD1ty1DWSzzCJFQ/uIkVJok8egCEo='
WHERE
key_id = '700c7b36ad45f2badd665cddfac50654768705fd007571e0c40a8130aeeb235e'
AND (
token = 'PvcvhIuxx/m9j/LD1ty1DWSzzCJFQ/uIkVJok8egCEo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)