UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5dbUlpVsQDWG/NcSUcpD4PKbJj6+tMg13pN/E4/2MfA=' 
WHERE 
  key_id = '09b4d0ac2d96ee512dc45d68496f1ebe9ca226ed836e3f7fe9d561e7fd9e0d78' 
  AND (
    token = '5dbUlpVsQDWG/NcSUcpD4PKbJj6+tMg13pN/E4/2MfA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036