UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WPjfbVvB+e9P/r0jqI6PgHi0578ysI73Y+/wW2oKCdY=' 
WHERE 
  key_id = 'fa26bffdff3e2651474d3e6c9f6c9fedb831cc32563845b482e16fa1061d487f' 
  AND (
    token = 'WPjfbVvB+e9P/r0jqI6PgHi0578ysI73Y+/wW2oKCdY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017