UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3o0f+zJyWmFHQ8EZbFbAVYf8W7fr1k2jhJuXrTkF6S4=' 
WHERE 
  key_id = '25a33384c27c4c27a575792c8dec3a82552ad33d0c92ce1f3eecd8588a156026' 
  AND (
    token = '3o0f+zJyWmFHQ8EZbFbAVYf8W7fr1k2jhJuXrTkF6S4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041