UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'w9ERdGvzJS/xHnYRsWKSfMDdrkvOk5DJhho924tq7MA=' 
WHERE 
  key_id = '23cab813416e0058bcabe92224a6074423463d15c3ef4b8b478c70cc7489c0ca' 
  AND (
    token = 'w9ERdGvzJS/xHnYRsWKSfMDdrkvOk5DJhho924tq7MA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037