UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ymob6jvZzUOQpyBGJaLtp1cs7L/rhfA4ij71/8qWj1g='
WHERE
key_id = 'be75b659e464cf395f9e0ef8836349e5835b1463aa54fc9736d914113bde14af'
AND (
token = 'Ymob6jvZzUOQpyBGJaLtp1cs7L/rhfA4ij71/8qWj1g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)