UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1MtRh4oTnI3PRD6pi/WM0xEoMFJ6jmcpJobYnTFkyL4=' 
WHERE 
  key_id = '8e3a6aecd56d43a3d1bd8bbc6798e213e2a661f488fb281f3543f60cfee86a03' 
  AND (
    token = '1MtRh4oTnI3PRD6pi/WM0xEoMFJ6jmcpJobYnTFkyL4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041