UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/4SYyzy0hv0w3SQzOGwcUa32Z4UAWjMryZ592FL39CI=' 
WHERE 
  key_id = 'ec5d74993f7e0f1f704ca6d7aa88dce7d6f1efe014a0b06895465c146764c512' 
  AND (
    token = '/4SYyzy0hv0w3SQzOGwcUa32Z4UAWjMryZ592FL39CI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030