UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'P7Cmjk5ljT5zu1YlOJ6N2MYomcWkWN2/SB9FSrKUaCM=' 
WHERE 
  key_id = '8f6f75a8379dfbe30839b9e3929d777a9fe9da7e722ab2e1af76a67e7a093f37' 
  AND (
    token = 'P7Cmjk5ljT5zu1YlOJ6N2MYomcWkWN2/SB9FSrKUaCM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030