UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '75nFvPm/3et8eU2DIl7mLVF8HoIidYtRGDXBGm4p/I8=' 
WHERE 
  key_id = '5c6735155ee35e02dcd554749623fad22ae0343cb3011622c7aa803d6e65835c' 
  AND (
    token = '75nFvPm/3et8eU2DIl7mLVF8HoIidYtRGDXBGm4p/I8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029