UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5nIt5EBGpq9HqhIDisYWcdBPVF3/0NspEaXKc+7ZeHw=' 
WHERE 
  key_id = '6fa626a9bb868618bd6a1562357c8d9753d2835ad4a2a0cf53d4a86f0d2a9c9d' 
  AND (
    token = '5nIt5EBGpq9HqhIDisYWcdBPVF3/0NspEaXKc+7ZeHw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029