UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rNqXMTbXANRUJsHOjM5acLAl0Oc6WXvOGcSJdnpRMNo=' 
WHERE 
  key_id = '033db5060c2b02b6dacb23cbb53697a2b411fcad4e3dd4a2a0ddc912bc13665c' 
  AND (
    token = 'rNqXMTbXANRUJsHOjM5acLAl0Oc6WXvOGcSJdnpRMNo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027