UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zQaG84VUR1h02xbbt7tMw53YXwP7MoHLOgzh/p9wdEU=' 
WHERE 
  key_id = '9932544d39c05b03d243fa4086678b9d1085a0951d77cd5edb6691cbb26b8116' 
  AND (
    token = 'zQaG84VUR1h02xbbt7tMw53YXwP7MoHLOgzh/p9wdEU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039