UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'k0fOx8NzkdKgLqz4i2Dz6rQgTsyCZXYXqny3gBCldhM=' 
WHERE 
  key_id = '36d67cce336a906d8b38b49926f1b66bcc792d5c4f74dd3cd78e958d0f54adf2' 
  AND (
    token = 'k0fOx8NzkdKgLqz4i2Dz6rQgTsyCZXYXqny3gBCldhM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038