UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6irszkX9bmLCu5A+CFV86svfuGbXCyZVy/bPlsIp9Ww=' 
WHERE 
  key_id = '62d4ed71ad6da95c283f8180c44a8d69a47f2a5b189c4c9ddc854085550990ee' 
  AND (
    token = '6irszkX9bmLCu5A+CFV86svfuGbXCyZVy/bPlsIp9Ww=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039