UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VndJ/geZQJS1Q/Cebc082ZFBOwMhMg98sXD5wPyrErE=' 
WHERE 
  key_id = '860ac4c25b0de07899903aedba7113898a9086957b1fb5670032389ad0606e9b' 
  AND (
    token = 'VndJ/geZQJS1Q/Cebc082ZFBOwMhMg98sXD5wPyrErE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00128