UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7ICKexmqXqe4FvOnpVL0lYcnsvWvzTUYlpntL192/kc=' 
WHERE 
  key_id = '82ea8536bd2b1d1a496cc3c253fb8e92a1aac4cbfe0b99fc618939d28ed214bd' 
  AND (
    token = '7ICKexmqXqe4FvOnpVL0lYcnsvWvzTUYlpntL192/kc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040