UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9jPElrxbWzLpfjKj2aaOFJalBs0eRPB9onarhXXvLO4=' 
WHERE 
  key_id = '6feba3a2fa0744a0fd77c6da0ba03e149e82251ae8128b33f1be55a5aa06366c' 
  AND (
    token = '9jPElrxbWzLpfjKj2aaOFJalBs0eRPB9onarhXXvLO4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048