UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6Bdb6xJ1pcKJazToPS/M9o5hXciPSkGzoCx5q5aNrVs=' 
WHERE 
  key_id = '5ef9ec6336fe3ffbc5777ee1ad7b28218bfc293802be3e43795b13f72bbb8e48' 
  AND (
    token = '6Bdb6xJ1pcKJazToPS/M9o5hXciPSkGzoCx5q5aNrVs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043