UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Ws7/1Ea0AyMNHoFnuo/vOJGqgNhg3BwpzJq1q7dRBNI=' 
WHERE 
  key_id = '53d772b50e33e8ca4ba12b7b530265b4b38eb1bc61d8f52ccd86b2639db2f9bf' 
  AND (
    token = 'Ws7/1Ea0AyMNHoFnuo/vOJGqgNhg3BwpzJq1q7dRBNI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028