UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '01e/fHMV6hdjuduJ9deep3r4VPW5V7t/re3ZtiahMac=' 
WHERE 
  key_id = 'ac1d69056527dd50eb135c8ca89dafbee09b84c4d64e4c7ff94b1f6e22976d9e' 
  AND (
    token = '01e/fHMV6hdjuduJ9deep3r4VPW5V7t/re3ZtiahMac=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00057