UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IgwDm/b7N8kz4O8eicitwP7Heng9no+AJfCpQHNh3go=' 
WHERE 
  key_id = '72b3421fc1c90436deb9cb8bfe05af3da906966121969634cab5f0bfe24ef978' 
  AND (
    token = 'IgwDm/b7N8kz4O8eicitwP7Heng9no+AJfCpQHNh3go=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031