UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'a7JS0Dk/30H247I+1MwrRQO88XmMupr2AJv1+4Xs3l8=' 
WHERE 
  key_id = 'a607a48ff0dc69d1b08a4c479ecb6be2fd74eb5fe7790aa3fb8c582e45f42bb5' 
  AND (
    token = 'a7JS0Dk/30H247I+1MwrRQO88XmMupr2AJv1+4Xs3l8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018