UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'flhqv2/OzDIO5BoPiSmkRhGiN8cRk+czhzleT62rYkk=' 
WHERE 
  key_id = '22b6f59105770b0f528446d479af3c4115cafe52c0f972c3d5fdf3936d3adc43' 
  AND (
    token = 'flhqv2/OzDIO5BoPiSmkRhGiN8cRk+czhzleT62rYkk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018