UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2yXf0jPBJx/41l1urZCA6fXejjiTCHfO5B1EWhdOBwQ=' 
WHERE 
  key_id = '24413da0a970cbe662240ec13a979c35d2d23f47dbaf39d134d297bc79b5f003' 
  AND (
    token = '2yXf0jPBJx/41l1urZCA6fXejjiTCHfO5B1EWhdOBwQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045