UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/C2dbyE/IrXqP7amvUx7A5XWGXrwpB0+QkFPL/4bMG0=' 
WHERE 
  key_id = '089d82a7332e424ca6d5853ffa82d1baaa3540e5de88b535c72f20791c88ba61' 
  AND (
    token = '/C2dbyE/IrXqP7amvUx7A5XWGXrwpB0+QkFPL/4bMG0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00053